/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package k3tool.tinyex.model;

import java.util.HashMap;

/**
 *
 * @author Jeff Huang
 */
public abstract class KindleResourceTypeHelper {

    public static final HashMap<KindleResourceType, String> typeNameMap =
            new HashMap<KindleResourceType, String>();
    public static final HashMap<String, KindleResourceType> suffixTypeMap =
            new HashMap<String, KindleResourceType>();

    static {
        typeNameMap.put(KindleResourceType.xhtml, "application/xhtml+xml");
        typeNameMap.put(KindleResourceType.gif, "image/gif");
        typeNameMap.put(KindleResourceType.png, "image/png");
        typeNameMap.put(KindleResourceType.jpeg, "image/jpeg");

        suffixTypeMap.put("html", KindleResourceType.xhtml);
        suffixTypeMap.put("htm", KindleResourceType.xhtml);
        suffixTypeMap.put("xhtml", KindleResourceType.xhtml);
        suffixTypeMap.put("jpg", KindleResourceType.jpeg);
        suffixTypeMap.put("jpeg", KindleResourceType.jpeg);
        suffixTypeMap.put("gif", KindleResourceType.gif);
        suffixTypeMap.put("png", KindleResourceType.png);

    }
}
